One popular conceptual architectural framework used when designing and developing computing applications is referred to as the Model-View-Controller (MVC) architecture. An MVC architecture, which may be thought of as a design pattern, typically separates components of an application into three entities—a model, a view, and a controller—so as to separate “internal” representations of information from the various ways that information may be presented to and/or accepted from an end user. The MVC architecture may allow developers to reduce the programming effort to design systems that include multiple views and/or interactions with the same underlying data.
One component of the MVC architecture is the model, which defines the behavior of the application in terms of its problem domain, and is typically completely (or mostly) independent from the user interface. The model directly manages the data, logic, and rules of the application. Another MVC component is the view, which can involve any outputted representation of information, such as a chart or a diagram. The third MVC component is the controller, which typically accepts input and converts the input to commands for the model or view. In addition to dividing MVC-based applications into three kinds of components, the MVC also defines the interactions between these components.
For example, a controller may send commands to the model to update the model's state, and may also send commands to an associated view to change the view's presentation of the model. As another example, a model may notify its associated view(s) and controller(s) when there has been a change in its state, which can allow the view(s) to generate updated output and/or the controller(s) to change the available set of commands. Additionally, a view may request information from the model that it uses to generate an output representation to the user.
Some architectural frameworks allow developers to make use of “widgets.” Widgets are software components that allows information to be programmatically displayed and/or provide user interpretable information. Widgets may include, for example, buttons, icons, scroll bars, drop-down menus, etc. Widgets are typically used to both provide information via graphical user interfaces (GUIs) for communicating between a program and a user, and possibly receive user input allowing the user to somehow manipulate the displayed information. The term widget may also, depending upon the context, be used to represent a software module (e.g., a relatively “small” program) that describes the user-perceived widget.
Since the advent of the MVC architecture, other similar architecture have been developed, including Hierarchical Model-View-Controller (HMVC), Model-View-Adapter (MVA), Model-View-Presenter (MVP), Model-View-ViewModel (MVVM), etc. All of these approaches attempt to separate different kinds of logic through the concept of modularity, in an attempt to minimize the need for large, all-encompassing code rewrites and allow for rapid and simplified updates and further development. For purposes of this discussion, reference to “MVC” architectures may generally also include these other approaches, unless indicated by the surrounding context of use.
In practice, many development environments and/or frameworks employing MVC-type architectures do not allow result in the desired efficient, modular, and non-duplicated code. For example, despite the original intention of the MVC approach, applications using MVC architecture still typically suffer from some code redundancy—especially when widgets are utilized—and “bleeding” when some model-type code might find its way into view or controller code, for example. This can make an application's code base swell in size, become difficult to understand and review, and can lead to the application becoming non-performant.
Accordingly, effective and intuitive techniques for architecting and generating software applications with user interfaces are always strongly desired.